export const state = () => ({
  theme: 'system-theme',
})

export const mutations = {
  changeTheme(state, data) {
    state.theme = data || 'system-theme'
    document.body.setAttribute('data-theme', state.theme)
  },
}

export const actions = {
  async changeThemeAction(context) {
    context.commit('changeTheme')
  },
}
